<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

<title>登录</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico"> 
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/font-awesome.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/animate.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/style.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/login.css"
	rel="stylesheet">

	<script>
		//if (window.top !== window.self) {
        if (window.top != window.self) {
            window.top.location = window.location;
        }
    </script>

</head>

<body class="signin" onkeydown="keyLogin()">
	<div id="myTime" style="margin-top:60px;position:fixed; right:300px; top:-60px;">
		 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="200" height="80" id="honehoneclock" align="middle">
		 <param name="allowScriptAccess" value="always">
		 <param name="movie" value="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_wh.swf">
		 <param name="quality" value="high">
		 <param name="bgcolor" value="#ffffff">
		 <param name="wmode" value="transparent">
		 <embed wmode="transparent" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_wh.swf" 
		 quality="high" bgcolor="#ffffff" width="300" height="128" name="honehoneclock" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
		 </object>
	</div>
		<div id="bobo" style="margin-top:60px;position:fixed; right:20px; top:75px;">
			<object type="application/x-shockwave-flash" style="outline:none;" data="http://cdn.abowman.com/widgets/hamster/hamster.swf?" width="288" height="225">
				<param name="movie" value="http://cdn.abowman.com/widgets/hamster/hamster.swf?">
				<param name="AllowScriptAccess" value="always">
				<param name="wmode" value="opaque">
			</object>
		</div>
	<div class="signinpanel">
		<div class="row">
			<div class="col-sm-7">
				<div class="signin-info">
					<div class="logopanel m-b">
						<h1>yuou.fun</h1>
					</div>
					<div class="m-b"></div>
					<h4>
						欢迎进入 <strong> 博客后台管理系统</strong>
					</h4>
					<ul class="m-b">
						<li>
							<i class="fa fa-arrow-circle-o-right m-r-xs"></i>
							游客账号:vistor  密码:123456
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right m-r-xs"></i>
							权限分配、操作日志
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right m-r-xs"></i>
							访客记录、IP剔除
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right m-r-xs"></i>
							分页数据、动态图表
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right m-r-xs"></i> 
							所有操作都异步
						</li>
						<li>
							<i class="fa fa-arrow-circle-o-right m-r-xs"></i>
							注：访问者无删除、修改操作
						</li>
						
					</ul>
					<div class=" tooltip-demo ">
						<strong>还没有账号？ 
						<a href="#" style="color:#3c3a39" data-toggle="tooltip" data-placement="top" title="QQ:3030997679">联系站长&raquo;</a>
							<a href="${pageContext.request.contextPath}/index.jsp"
							style="color:#3c3a39;margin-left:15px;">首页&raquo;</a></strong>

					</div>
				</div>
			</div>
			<div class="col-sm-5">
				<form id="login" action="" method="post">
					<h3 class="no-margins">登录</h3>
					<p class="m-t-md">游客账号:visitor  密码:123456</p>
					<input type="text" id="username" required="required" value="${username }" name="username" class="form-control uname"
						placeholder="用户名" /> 
						<input type="password" value="${password }" required="required" name="password" id="password"
						class="form-control pword m-b" placeholder="密码" /> 
						<a style="color:#101010de" href="javascript:void(0);" title="QQ:3030997679">忘记密码了？</a>
						 <span class="msg" style="color:red;margin-left:20px;">${message }</span>
					<button type="button" onclick="login()" class="btn btn-success btn-block">登录</button>
				</form>
			</div>
		</div>
		<div class="signup-footer">
			<div class="pull-left">
				<strong>&copy; 2018 噢米噶 blog</strong>
			</div>
		</div>
	</div>
	<div class="gohome" style="display:none"></div>
	<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/content.js"></script>
	<script src="${pageContext.request.contextPath}/js/gVerify.js"></script>
	<script type="text/javascript">
	
	$(document).ready(function() {
		$(".gohome").css("display","none");
		var userAgentInfo = navigator.userAgent;
		var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); 
		for (var v = 0; v < Agents.length; v++) {  
	    if (userAgentInfo.indexOf(Agents[v]) > 0) { $("#bobo,#myTime").css("display","none"); break; }  
		}
	});

var keyLogin = function(){
	if (event.keyCode == 13){
		login();
     }
}


var login=function(){
	var username=$("#username").val().replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g, "&quot;").replace(/'/g, "&#039;");
	var password=$("#password").val().replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g, "&quot;").replace(/'/g, "&#039;");
	if(username==null||username==""||username=="AA=="){
		$(".msg").html("用户名不能为空！");
	}else if(password==null||password==""||password=="AA=="){
		$(".msg").html("密码不能为空！");
	}else{
		$(".msg").html("");
		$("#login").attr("action","${pageContext.request.contextPath}/checkLogin/"+username+"");
		$("#login").submit();
	}
	
}
</script>
</body>

</html>
